/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.sys.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.sys.entity.Settings;

/**
 * 费率DAO接口
 * @author lvbo
 * @version 2013-06-28
 */
public interface SettingsDao extends SettingsDaoCustom, CrudRepository<Settings, Long> {

	@Query("from Settings where key = ?1")
	public Settings findByKey(String key);
	
	@Query("from Settings")
	public List<Settings> findAll();
}

/**
 * DAO自定义接口
 * @author lvbo
 */
interface SettingsDaoCustom extends BaseDao<Settings> {

}

/**
 * DAO自定义接口实现
 * @author lvbo
 */
@Component
class SettingsDaoImpl extends BaseDaoImpl<Settings> implements SettingsDaoCustom {

}
